﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DateSelector.ascx.cs" Inherits="LCA.Admin.FormControls.DateSelector" %>

<asp:TextBox ID="txtDatePicker" runat="server"></asp:TextBox>
<script type="text/javascript">
//<![CDATA[
    $(function () {

        $("#<%=txtDatePicker.ClientID%>")
            .attr("readonly", "readonly")
            .<%= this.ShowHours? "datetimepicker" : "datepicker" %>({
                dateFormat: "mm/dd/yy",
                <% if (this.ShowHours) { %>timeFormat: "hh:mm TT",<% } %>
                constrainInput: true,
                minDate: new Date(1753, 1 - 1, 1),
                maxDate: new Date(9999, 12 - 1, 31),
                changeYear: true,
                changeMonth: true,
                yearRange: "c-100:c+100"
            });

    });
//]]>
</script>
